/*
 * *
 *  * Copyright (c) iwindplus Technologies Co., Ltd.2024-2030, All rights reserved.
 *
 *
 */

package com.iwindplus.mgt.domain.vo.power;

import com.iwindplus.boot.domain.vo.BaseVO;
import com.iwindplus.mgt.domain.enums.ResourceTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 资源选中视图对象（服务名称分组）.
 *
 * @author zengdegui
 * @since 2018/9/17
 */
@Schema(description = "资源选中视图对象（服务名称分组）")
@Data
@EqualsAndHashCode(callSuper = false)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class ResourceGroupVO extends BaseVO {

    /**
     * 排序号.
     */
    @Schema(description = "排序号")
    private Integer seq;


    /**
     * 是否选中（false:否 true：是）.
     */
    @Schema(description = "是否选中（false:否 true：是）")
    private Boolean checked;

    /**
     * 菜单集合.
     */
    @Schema(description = "菜单集合")
    private List<MenuBaseVO> menus;

    /**
     * 菜单基础信息.
     */
    @Data
    @EqualsAndHashCode(callSuper = false)
    @SuperBuilder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class MenuBaseVO extends BaseVO {

        /**
         * 排序号.
         */
        @Schema(description = "排序号")
        private Integer seq;

        /**
         * 是否选中（false:否 true：是）.
         */
        @Schema(description = "是否选中（false:否 true：是）")
        private Boolean checked;

        /**
         * 资源集合.
         */
        @Schema(description = "资源集合")
        private List<ResourceBaseVO> resources;
    }

    /**
     * 资源基础信息.
     */
    @Data
    @EqualsAndHashCode(callSuper = false)
    @SuperBuilder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class ResourceBaseVO extends BaseVO {

        /**
         * 排序号.
         */
        @Schema(description = "排序号")
        private Integer seq;

        /**
         * 是否选中（false:否 true：是）.
         */
        @Schema(description = "是否选中（false:否 true：是）")
        private Boolean checked;

        /**
         * 类型（BUTTON：按钮，API：API）.
         */
        @Schema(description = "类型（BUTTON：按钮，API：API）")
        private ResourceTypeEnum type;
    }
}
